<include file="Public/header" />
<title>管理员列表</title>
<style>
	.red td{
		color:red;
	}
</style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 仓库管理 <span class="c-gray en">&gt;</span> 保质期列表<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">

	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		<form class="formleft" name="" id="" action="__URL__/get_warehousebound_overduetime/" method="get">
			<input class="input-text" style="width:200px" type="hidden" value="<{$_GET['warehouse_code']}>" placeholder="仓库编码" name="warehouse_code" >
			<input class="input-text" style="width:200px" type="hidden" value="<{$_GET['manua_id']}>" placeholder="账册编号" name="manua_id" >
			<input class="input-text" style="width:200px" type="text" value="<{$_GET['goods_no']}>" placeholder="商品编码" name="goods_no" >
			<input class="input-text" style="width:200px" type="text" value="<{$_GET['goods_name']}>" placeholder="商品名称" name="goods_name" >
			<input class="input-text" style="width:200px" type="text" value="<{$_GET['bar_code']}>" placeholder="条形码" name="bar_code" >
			过期时间：
			<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="d2423" name="start_time" value="<{$Think.get.start_time}>" class="input-text Wdate" style="width:120px;">
			-
			<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" id="logmax" name="end_time" value="<{$Think.get.end_time}>" class="input-text Wdate" style="width:120px;">
			<button type="submit" class="btn btn-success"><i class="icon-plus"></i> 查询</button>
			<a type="button" href="<{:U('get_warehousebound',array('warehouse_code'=>I('warehouse_code'),'manua_id'=>I('manua_id')))}>" class="btn btn-success">库存列表</a>
		</form>
		<span class="r">共有数据：<strong><{$total}></strong> 条</span> 
    </div>
	
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="20">商品库存列表</th>
			</tr>
			<tr class="text-c">
				<th width="25"><input type="checkbox" name="" value=""></th>
				<th>序号</th>
				<th width="">商品编码</th>
				<th width="">账册编号</th>
				<th width="">商品名称</th>
				<th width="">条形码</th>
				<th width="">单位</th>
				<th width="">可售库存</th>
				<!-- <th width="">入库数量</th> -->
				<th width="">合格品</th>
				<th width="">不良品</th>
				<th width="">报废品</th>
				
				<th width="">过期时间</th>
				<th width="">剩余天数</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="vo">
			<tr class="text-c <if condition="ceil(($vo['overdue_time']-time())/3600/24) LT 120" >red</if>" >
				<td><input  class="uids" type="checkbox" value="<{$vo.id}>" name="ids[]"></td>
				<td><{$i}></td>
				<td><{$vo.goods_no}></td>
				<td><{$vo.manua_id}></td>
				<td><{$vo.goods_name}></td>
				<td><{$vo.bar_code}></td>
				<td><{$vo.unit1}></td>
				<td><{$vo.storage_amount}>(<{$vo.unit1}>)</td>
				<!-- <td><{$vo.receive_amount}>(<{$vo.unit1}>)</td> -->
				<td><{$vo.conforming_p}>(<{$vo.unit1}>)</td>
				<td><{:empty($vo['bad_product'])?0:$vo['bad_product']}>(<{$vo.unit1}>)</td>
				<td>0(<{$vo.unit1}>)</td>
				
				<td><{$vo.overdue_time|date="Y-m-d",###}></td>
				<td>
				
				<{:ceil(($vo['overdue_time']-time())/3600/24)}>天</td>
			</tr>
			</volist>			
		</tbody>
	</table>
	<div class="page mt" style="text-align:right"><{$page}></div>
</div>
<script>
	function sysn(){
		location.reload();
	}
	
	function exportExcel(status){
		if(status==3){
			var option = $(".uids");
			var checked_counts=0;
			var check_val = [];
			for(var i=0;i<option.length;i++){
				if(option[i].checked){
					checked_counts++;
					check_val.push(option[i].value);
				}
			}
			if(checked_counts==0){
				layer.msg('至少选中一个');
				return false;
			}else{
				var url="<{$excel_url}>?excel=1&status="+status+"&ids="+check_val;
			}
		}else{
				var url="<{$excel_url}>?excel=1&status="+status;
		}
		window.location.href=url;
	}

</script>
<include file="Public/footer" />
<include file="Public/footer_js" />
</body>
</html>